package com.topone.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;
import org.springframework.stereotype.Component;

@Component
@PropertySources({
        @PropertySource("classpath:wechat.provider.properties")
})
public class WechatPayProperties {

    protected final Logger LOG = LoggerFactory.getLogger(getClass());

    @Value("${providerAppId}")
    private String appId;

    @Value("providerSecret")
    private String providerSecret;

    @Value("${providerMchId}")
    private String mchId;

    @Value("${providerMchKey}")
    private String mchKey;

    @Value("${keyProviderPath}")
    private String keyPath;

    /**
     * 支付结果后的异步通知地址
     */
    @Value("${providerNotifyUrl}")
    private String notifyUrl;

    @Value("${wxProviderRedirectDomain}")
    private String wxRedirectDomain;

    /**
     * 退款结果后的异步通知地址
     */
    @Value("${providerRefundNotifyUrl}")
    private String RefundNotifyUrl;

    @Value("${httpProviderProxyHost}")
    private String httpProxyHost;

    @Value("${httpProviderProxyPort}")
    private String httpProxyPort;

    public Logger getLOG() {
        return LOG;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getMchKey() {
        return mchKey;
    }

    public void setMchKey(String mchKey) {
        this.mchKey = mchKey;
    }

    public String getKeyPath() {
        return keyPath;
    }

    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getWxRedirectDomain() {
        return wxRedirectDomain;
    }

    public void setWxRedirectDomain(String wxRedirectDomain) {
        this.wxRedirectDomain = wxRedirectDomain;
    }

    public String getRefundNotifyUrl() {
        return RefundNotifyUrl;
    }

    public void setRefundNotifyUrl(String refundNotifyUrl) {
        RefundNotifyUrl = refundNotifyUrl;
    }

    public String getHttpProxyHost() {
        return httpProxyHost;
    }

    public void setHttpProxyHost(String httpProxyHost) {
        this.httpProxyHost = httpProxyHost;
    }

    public String getHttpProxyPort() {
        return httpProxyPort;
    }

    public void setHttpProxyPort(String httpProxyPort) {
        this.httpProxyPort = httpProxyPort;
    }

    public String getProviderSecret() {
        return providerSecret;
    }

    public void setProviderSecret(String providerSecret) {
        this.providerSecret = providerSecret;
    }
}
